from django.contrib import admin
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from drfstudy.views import StudentViewSet, ClassesViewSet

urlpatterns = [
    # path('students/', StudentViewSet.as_view({'get': 'list', 'post': 'create'})),
    # path('students/<int:pk>', StudentViewSet.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'destory'}))

]
router = DefaultRouter()
router.register('students', StudentViewSet, basename='student')
router.register('classes', ClassesViewSet, basename='classes')
urlpatterns += router.urls
